// ============================================================================
//
// LCP-net framework by Pierre CHATEL chatelp@gmail.com
// Distributed under GPLv3
// Copyright (C) THALES Land & Joint Systems, 2008, 2009. All rights reserved
//
// ============================================================================

/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package com.thalesgroup.preferenceFramework.models.LCPnet;

import com.thalesgroup.preferenceFramework.models.LCPnet.exceptions.LNodeEvaluationException;
import com.thalesgroup.preferenceFramework.models.LCPnet.exceptions.LCPnetEvaluationException;
import net.sourceforge.jFuzzyLogic.FIS;

import com.thalesgroup.preferenceFramework.models.Node;
import com.thalesgroup.preferenceFramework.models.exceptions.PreferenceEvaluationException;
import com.thalesgroup.preferenceFramework.models.exceptions.PreferenceException;
import org.eclipse.emf.common.util.EList;

/**
 * <!-- begin-user-doc -->
 * A representation of the model object '<em><b>LNode</b></em>'.
 * <!-- end-user-doc -->
 *
 * <p>
 * The following features are supported:
 * <ul>
 *   <li>{@link com.thalesgroup.preferenceFramework.models.LCPnet.LNode#getLinguisticTable <em>Linguistic Table</em>}</li>
 *   <li>{@link com.thalesgroup.preferenceFramework.models.LCPnet.LNode#getValueDomain <em>Value Domain</em>}</li>
 * </ul>
 * </p>
 *
 * @see com.thalesgroup.preferenceFramework.models.LCPnet.LCPnetPackage#getLNode()
 * @model
 * @generated
 */
public interface LNode extends Node {
	/**
	 * Returns the value of the '<em><b>Linguistic Table</b></em>' containment reference.
	 * It is bidirectional and its opposite is '{@link com.thalesgroup.preferenceFramework.models.LCPnet.CLPT#getNode <em>Node</em>}'.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Linguistic Table</em>' containment reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Linguistic Table</em>' containment reference.
	 * @see #setLinguisticTable(CLPT)
	 * @see com.thalesgroup.preferenceFramework.models.LCPnet.LCPnetPackage#getLNode_LinguisticTable()
	 * @see com.thalesgroup.preferenceFramework.models.LCPnet.CLPT#getNode
	 * @model opposite="node" containment="true" required="true"
	 * @generated
	 */
	CLPT getLinguisticTable();

	/**
	 * Sets the value of the '{@link com.thalesgroup.preferenceFramework.models.LCPnet.LNode#getLinguisticTable <em>Linguistic Table</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Linguistic Table</em>' containment reference.
	 * @see #getLinguisticTable()
	 * @generated
	 */
	void setLinguisticTable(CLPT value);

	/**
	 * Returns the value of the '<em><b>Value Domain</b></em>' reference.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of the '<em>Value Domain</em>' reference isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @return the value of the '<em>Value Domain</em>' reference.
	 * @see #setValueDomain(LinguisticDomain)
	 * @see com.thalesgroup.preferenceFramework.models.LCPnet.LCPnetPackage#getLNode_ValueDomain()
	 * @model required="true"
	 * @generated
	 */
	LinguisticDomain getValueDomain();

	/**
	 * Sets the value of the '{@link com.thalesgroup.preferenceFramework.models.LCPnet.LNode#getValueDomain <em>Value Domain</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @param value the new value of the '<em>Value Domain</em>' reference.
	 * @see #getValueDomain()
	 * @generated
	 */
	void setValueDomain(LinguisticDomain value);
	
	/**
	 * Returns the utility value of this node given a specific node value
	 * affectation.
	 * 
	 * @param inputValues
	 *            the values of the input nodes
	 * @param nodeValue
	 *            the value of the node
	 * @return utility for this node affectation
	 * 
	 * @model inputValuesMany="true"
	 * @generated
	 */
	double getUtility(EList<CNodeValue> inputValues, CNodeValue nodeValue) throws LNodeEvaluationException;

	/**
	 * Returns the utility value of this node given a specific node value
	 * affectation.
	 * 
	 * @param outcome node value affectations as an outcome
	 * @return utility for this outcome
	 * 
	 * @model outcomeRequired="true"
	 * @generated
	 */
	double getUtility(COutcome outcome) throws LNodeEvaluationException;

	/**
	 * Returns the Fuzzy Inference System (FIS) corresponding to this particular node.
	 * @return the initialized FIS.
	 */
	FIS getFuzzyInferenceSystem() throws LCPnetEvaluationException;
} // LNode
